#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h> 
#include <stdlib.h> 
#include <string.h> 
#include <math.h> 
#include <ctype.h> 
#include <time.h> 
#include <assert.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int sum = 0;

	for (int i = 0; i <= 4; i++)
	{
		int wei = i;
		while (wei >= 0)
		{
			sum += n * pow(10, wei);
			wei--;
		}
	}

	printf("%d", sum);
	return 0;
}
